FUNCTION DAC_4BytesToDword :DWORD
TITLE = 'DAC_4BytesToDword'
//
// This functionblock build a dword of 4 single bytes
// 
// Versionshistory:
// 1.0 Ersterstellung E.Dittmann

VERSION : '1.0'
AUTHOR  : 'Lenze'
FAMILY  : 'DAC'
NAME : 'dwOf4by'
KNOW_HOW_PROTECT


VAR_INPUT
    byInput1:                    BYTE;                              // Inputbyte 1
    byInput2:                    BYTE;                              // Inputbyte 2
    byInput3:                    BYTE;                              // Inputbyte 3
    byInput4:                    BYTE;                              // Inputbyte 4
END_VAR

VAR
END_VAR

BEGIN
    DAC_4BytesToDword := SHL(IN:=SHL(IN:=SHL(IN:=BYTE_TO_DWORD(byInput4),N:=8) OR BYTE_TO_DWORD(byInput3),N:=8) OR BYTE_TO_DWORD(byInput2),N:=8) OR BYTE_TO_DWORD(byInput1);
END_FUNCTION

